<?php
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Query;

class DefaultDb_Repositories_FacturasRepository extends EntityRepository
{
    public function findBetween($startDate, $endDate)
    {
        $em = $this->getEntityManager();
        $query = $em->createQuery('SELECT m FROM DefaultDb_Entities_Facturas m WHERE m.fecha BETWEEN \''.$startDate.'\' and \''.$endDate.'\'');
        return $query->getResult();
    }
}
